<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/template/globalTemplate.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="title">
        Detail de la session
    </ui:define>

    <ui:define name="ariane">
        ariane
    </ui:define>

    <ui:define name="content">

        <f:metadata>
            <f:viewParam name="id" converter="#{sessionConverter}" value="#{visitorSessionDetailBean.session}" />
        </f:metadata>

        <h:panelGrid id="eventDetails" columns="2">
            <h:outputLabel value="Formation :" />
            <h:outputLabel value="#{visitorSessionDetailBean.session.formation.libelle}" />

            <h:outputLabel value="Description :" />
            <h:outputLabel value="#{visitorSessionDetailBean.session.formation.description}" />

            <h:outputLabel value="Debut de la session :"/>
            <h:outputLabel value="#{visitorSessionDetailBean.session.dateDebut}">
                <f:convertDateTime pattern="dd/MM/yyyy"/>
            </h:outputLabel>

            <h:outputLabel value="Fin de la session :"/>
            <h:outputLabel value="#{visitorSessionDetailBean.session.dateFin}">
                <f:convertDateTime pattern="dd/MM/yyyy"/>
            </h:outputLabel>

            <h:outputLabel value="Salle :"/>
            <h:outputLabel value="#{visitorSessionDetailBean.session.salle.libPiece}"/>

        </h:panelGrid>    

        <p:dataTable var="uneSeance" value="#{visitorSessionDetailBean.session.listSeance}" widgetVar="informationTable">
            <p:column headerText="Séance">
                <h:outputText value="*" />
            </p:column>
            <p:column headerText="Date">
                <h:outputText value="#{uneSeance.dateHeureDebut}">
                    <f:convertDateTime pattern="dd/MM/yy"/>
                </h:outputText>
            </p:column>
            <p:column headerText="Horaire">
                <h:outputText value="#{uneSeance.dateHeureDebut}">
                    <f:convertDateTime pattern="HH:mm"/>
                </h:outputText>
                -
                <h:outputText value="#{uneSeance.dateHeureFin}">
                    <f:convertDateTime pattern="HH:mm"/>
                </h:outputText>
            </p:column>
        </p:dataTable>  



        <p:commandButton 
            value="#{msg['application.inscription']}"
            action="#{visitorSessionDetailBean.inscrire()}"
            update="messages"/>

    </ui:define>

    <ui:define name="popup">
        popup
    </ui:define>

</ui:composition>
